package com.batch.listener;

import org.springframework.batch.core.ExitStatus;
import org.springframework.batch.core.StepExecution;
import org.springframework.batch.core.StepExecutionListener;

/**
 * 自定义监听器
 */

public class StepListener1 implements StepExecutionListener {


    @Override
    public void beforeStep(StepExecution stepExecution) {
        System.out.println("----------beforeStepListener1------------");
    }

    @Override
    public ExitStatus afterStep(StepExecution stepExecution) {
        System.out.println("----------afterStepListener1-------------");
        return stepExecution.getExitStatus();
    }
}
